Source for file SC_Date.php
Documentation is available at SC_Date.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
function SC_Date($start_year= '', $end_year= '') {
* FIXME $default_year に一致いる行が無かった場合、先頭か末尾に付加すべきと思われる。
* @param string $year XMLファイル名
* @param bool|string$default_year
* string 「選択なし」は指定された値の下に付加する。
* @param string $default_key
function getYear($year = '', $default_year = false, $default_key = '----') {
if ( ! $year ) $year = DATE('Y');
if ( ! $end_year ) $end_year = (DATE('Y') + 3);
if ($default_year === true) {
$year_array[$default_key] = '----';
for ($i = $year; $i <= $end_year; $i++ ) {
if ($default_year !== true && strlen($default_year) >= 1 && $i == $default_year) {
$year_array[$default_key] = '----';
if ( ! $year ) $year = DATE('Y');
if ( ! $end_year ) $end_year = (DATE('Y') + 3);
for ($i = $year; $i <= $end_year; $i++ ) {
$year_array[$key] = $key;
for ($i= 1; $i <= 12; $i++ ){
$month_array[$val] = $val;
if ($default) $month_array[''] = '--';
for ($i= 0; $i < 12; $i++ ){
$month_array[$i + 1 ] = $i + 1;
function getDay($default = false) {
if ($default) $day_array[''] = '--';
for ($i= 0; $i < 31; $i++ ){
$day_array[ $i + 1 ] = $i + 1;
for ($i= 0; $i<= 23; $i++ ){
$minutes_array = array();
for ($i= 0; $i<= 59; $i++ ){
$minutes_array = array("00"=> "00", "30"=> "30");
Documentation generated on Fri, 24 Feb 2012 14:02:30 +0900 by Seasoft
|